
#ifndef SX_CUBOID_ARCHETYPE_H
#define SX_CUBOID_ARCHETYPE_H

#include <sxGeometricObject_Archetype.h>
#include <sxCuboid.h>
#include <sxStaticRepresentation.h>

/* Archetype classes. */
using Sx::Graphics::Objects::Rendering::RendererImplementation;
using Sx::Graphics::StaticRepresentation;
using Sx::Graphics::Objects::Cuboid;

namespace Sx {
namespace Graphics {
namespace Archetypes {
namespace Objects {

class Cuboid_Archetype : public GeometricObject_Archetype<Cuboid, float, StaticRepresentation> {
public:
	Cuboid_Archetype(const std::shared_ptr<RendererImplementation>& renderer);
	Cuboid_Archetype(const std::shared_ptr<RendererImplementation>& renderer, const Eigen::Vector3f& min, const Eigen::Vector3f& max);
	Cuboid_Archetype(const std::shared_ptr<RendererImplementation>& renderer, float minX, float minY, float minZ, float maxX, float maxY, float maxZ);
	virtual ~Cuboid_Archetype();

	bool construct();

	/* Picking interface */
	bool pick(const Eigen::Vector3f& pickSegmentStart, const Eigen::Vector3f& pickSegmentEnd, Eigen::Vector3f& intersectionPoint);

	/* Intersectable Interface */
	bool intersect(const Eigen::Vector3f& segment_p0, const Eigen::Vector3f& segment_p1, Eigen::Vector3f& intersectionPoint);
};

}

}

}

}

#endif
